package com.yangff.entity.transaction.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 存储用户的交易记录
 * </p>
 *
 * @author yangff
 * @since 2025-01-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("transactionrecord")
public class Transactionrecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 交易记录唯一标识符
     */
    @TableId(value = "transaction_id", type = IdType.AUTO)
    private Long transactionId;

    /**
     * 关联用户表的用户账号
     */
    private String account;

    /**
     * 关联理财产品表的产品账号
     */
    private String code;

    /**
     * 交易类型，买入或卖出
     */
    private String transactionType;

    /**
     * 交易金额
     */
    private Double amount;


    /**
     * 交易时间
     */
    private LocalDateTime transactionDate;


}
